package cn.itcast.day02.demo03;

public class Demo01Student {
    public static void main(String[] args) {
        Student stu1 = new Student();//无参构造
        System.out.println("================================");
        Student stu2= new Student("赵丽颖",20); //全参构造
        System.out.println("姓名: " + stu2.getName() + ",年龄：" + stu2.getAge());
        //如果需要改变对象当中成员变量的数据内容，仍然需要使用setXxx方法
        stu2.setAge(32);//改变年龄
        System.out.println("姓名: " + stu2.getName() + ",年龄：" + stu2.getAge());
    }
}
